﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Microsoft.EntityFrameworkCore;

#nullable disable

namespace lin_cms_dotnet_core.Models
{
    [Table("lin_user")]
    [Index(nameof(Email), nameof(DeleteTime), Name = "email_del", IsUnique = true)]
    [Index(nameof(Username), nameof(DeleteTime), Name = "username_del", IsUnique = true)]
    public partial class LinUser
    {
        [Key]
        [Column("id", TypeName = "int(10) unsigned")]
        public uint Id { get; set; }
        [Required]
        [Column("username")]
        [StringLength(24)]
        public string Username { get; set; }
        [Column("nickname")]
        [StringLength(24)]
        public string Nickname { get; set; }
        [Column("avatar")]
        [StringLength(500)]
        public string Avatar { get; set; }
        [Column("email")]
        [StringLength(100)]
        public string Email { get; set; }
        [Column("create_time", TypeName = "datetime(3)")]
        public DateTime CreateTime { get; set; }
        [Column("update_time", TypeName = "datetime(3)")]
        public DateTime UpdateTime { get; set; }
        [Column("delete_time", TypeName = "datetime(3)")]
        public DateTime? DeleteTime { get; set; }
    }
}
